package cn.tpshion.devops.node.support;

import cn.hutool.core.util.IdUtil;
import cn.tpshion.devops.domain.entity.NodeData;
import cn.tpshion.devops.domain.entity.TaskWork;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 节点上下文
 * 用户传递节点参数
 */
@Data
public class NodeContext {

    private String nodeId;

    private String taskId;

    private Long batchId;

    private TaskWork taskWork;

    private NodeData nodeData;

    private LocalDateTime createTime = LocalDateTime.now();

    private String uuid = IdUtil.fastUUID();

    private Map<String, Object> data = new ConcurrentHashMap<>();

}
